package me.cangming.patchsdk.sample;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {


    private TextView mutiShow;
    private TextView testBug;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        initEvent();

    }

    private void initView() {
        testBug = (TextView) findViewById(R.id.txt_test_bug);
        mutiShow = (TextView) findViewById(R.id.txt_muti_show);
    }


    private void initEvent() {
        testBug.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                throw new RuntimeException("test Bug");
//                Toast.makeText(MainActivity.this, "已经修复bug", Toast.LENGTH_SHORT).show();
                Toast.makeText(MainActivity.this, "已经修复bug22222", Toast.LENGTH_SHORT).show();
            }
        });
        mutiShow.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(MainActivity.this, "Hello Plugin", Toast.LENGTH_SHORT).show();
            }
        });
    }

}
